﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;

namespace LuoYi.Admin.Entities;

/// <summary>
/// 用户和角色关联表
/// </summary>
[PrimaryKey("UserId", "RoleId")]
[Table("sys_user_role")]
public class SysUserRole : IEntity
{
    /// <summary>
    /// 用户ID
    /// </summary>
    [Key]
    [Column("user_id", TypeName = "bigint(20)")]
    public long UserId { get; set; }

    /// <summary>
    /// 角色ID
    /// </summary>
    [Key]
    [Column("role_id", TypeName = "bigint(20)")]
    public long RoleId { get; set; }
}
